<!-- 模态框（Modal）-->
<div class="modal-header">
    <h4 class="modal-title" translate="device.thresholdSet"></h4>
</div>
<div class="modal-body">
    <div class="panel-body" id="mianban">
    <ng-form name="paramForm" class="form-horizontal form-validation">
        <div class="form-group" style="height: 27px;">
            <div class="col-sm-6">
                <label class="col-sm-4 control-label">
                    <span class="text-danger">*</span>
                    <span translate="device.param"></span>
                </label>
                <div class="col-sm-8">
                    <select class="form-control" ng-model="vm.thresholdSet.paramType" 
                            uib-tooltip="{{'device.plSelect' | translate}}" required ng-change="vm.change()">
                        <!--风向不设置阈值-->
                        <option ng-repeat="x in vm.params" value="{{x.value}}" ng-if="x.value!=5">{{ x.content }}</option>
                    </select>
                </div>
            </div>
            <div class="col-sm-6">
                <label class="col-sm-4 control-label">
                    <span class="text-danger">*</span>
                    <span translate="device.threshold"></span>
                </label>
                <div class="col-sm-8">
                    <div class="input-group">
                        <input type="number" class="form-control" name="threshold" maxlength="10"
                               ng-model="vm.thresholdSet.paramValue" required
                               uib-tooltip="{{'common.op.remind5' | translate}}"/>
                        <span class="input-group-btn">
                            <button class="btn btn-default" ng-click="vm.add()">
                                <i class="fa fa-plus"></i>
                            </button>
                        </span>
                    </div>
                </div>
            </div>
        </div>
        <div class="form-group" style="height: 27px;" ng-repeat=" x in vm.Array">
            <div class="col-sm-6">
                <label class="col-sm-4 control-label">
                    <span class="text-danger">*</span>
                    <span translate="device.param"></span>
                </label>
                <div class="col-sm-8">
                    <select class="form-control" ng-model="$parent.param1[$index]" ng-change="vm.change()"
                            uib-tooltip="{{'device.plSelect' | translate}}" required>
                        <option ng-repeat="y in x.param " value="{{y.value}}" ng-if="y.value!=5">{{ y.content }}</option>
                    </select>
                </div>
            </div>
            <div class="col-sm-6">
                <label class="col-sm-4 control-label">
                    <span class="text-danger">*</span>
                    <span translate="device.threshold"></span>
                </label>
                <div class="col-sm-8">
                    <div class="input-group">
                        <input type="number" class="form-control" name="threshold" maxlength="10"
                               ng-model="$parent.param2[$index]" required
                               uib-tooltip="{{'common.op.remind5' | translate}}"/>
                        <span class="input-group-btn">
                            <button class="btn btn-default" ng-click="vm.del()">
                                <i class="fa fa-minus"></i>
                            </button>
                        </span>
                    </div>
                </div>
            </div>
        </div>
</ng-form>
    </div>

    <div class="panel-footer text-right bg-light lter" style="margin-top:20px;">
        <button type="button" class="btn btn-default" ng-click="vm.cancelDevicesetList()"
                translate="common.cancel"></button>
        <button type="button" class="btn btn-primary" ng-click="vm.saveDevicesetList()" ng-disabled="paramForm.$invalid"
                translate="common.confirm"></button>
    </div>
</div>